package com.example.flowcomparablepartition;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class FlowCountReducer extends Reducer<FlowBean2, Text,Text, FlowBean2> {
    @Override
    protected void reduce(FlowBean2 key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
        //  key =<240,(13729199489,13768778790,13966251146)>
        //循环输出，避免总流量相同情况
        for (Text value : values) {
            context.write(value,key);
        }
    }
}
